package org.raymond.iworks.study.basic.designpattern.memento;

import java.util.ArrayList;
import java.util.List;

/**
 * @author raymond
 * @version V1.0
 * @Description: TODO
 */
public class Caretaker {
    // 最简单的实现,也可以用Map来加强
    private List<Memento> mementoList = new ArrayList<>();

    public void add(Memento memento){
        mementoList.add(memento);
    }

    public Memento get(int index){
        return mementoList.get(index);
    }
}
